add_definitions(-DTRANSLATION_DOMAIN=\"kcm_wallpaper\")
include(ECMQtDeclareLoggingCategory)
ecm_qt_declare_logging_category(common_SRCS
    HEADER
        logging.h
    IDENTIFIER
        KCM_WALLPAPER
    CATEGORY_NAME
        kcm_wallpaper
    DEFAULT_SEVERITY
        Warning
    DESCRIPTION
        "KCM for wallpaper"
    EXPORT
        kcm_wallpaper
)

kcoreaddons_add_plugin(kcm_wallpaper INSTALL_NAMESPACE "plasma/kcms/systemsettings")

ecm_qt_install_logging_categories(
    EXPORT kcm_wallpaper
    DESTINATION "${KDE_INSTALL_LOGGINGCATEGORIESDIR}"
)

kcmutils_generate_desktop_file(kcm_wallpaper)

target_sources(kcm_wallpaper PRIVATE
    ${common_SRCS}
    kcmwallpaper.cpp
    kcmwallpaper.h
    wallpaper_integration.cpp
    wallpaper_integration.h
)

target_link_libraries(kcm_wallpaper
    KF5::CoreAddons
    KF5::ConfigCore
    KF5::ConfigQml
    KF5::I18n
    KF5::QuickAddons
    KF5::Package
    KF5::KCMUtils
    KF5::XmlGui
)

kpackage_install_package(package kcm_wallpaper kcms)
